//
//  tool.h
//  yifa
//
//  Created by 刘亨平 on 15/7/11.
//  Copyright (c) 2015年 liuhengping. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CommonCrypto/CommonDigest.h>
//#import "MBProgressHUD+MJ.h"
 @interface tool : NSObject

+ (UIColor *)getColor:(NSString*)hexColor;

+(UIImage *)imageWithColor:(UIColor *)color;

+ (BOOL)validateNumber:(NSString*)number;

+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;
+ (NSArray *)arrayWithJsonString:(NSString *)jsonString;
+(NSMutableString *)replaceJsonxiegang:(id)_json;

+ (NSData *)resetSizeOfImageData:(UIImage *)source_image maxSize:(NSInteger)maxSize;


#pragma mark - 生成json格式的文本
+(NSString *)returnjson:(id)params;

+(void)addleftview_for_textfield:(UITextField *)textfield;
+ (NSDate *)dateFromString:(NSString *)dateString;
+(NSString *)returndate1:(NSString *)_add format:(NSString *)_format;

+ (NSDate *)dateFromString1:(NSString *)dateString;
+(NSString *) returnThumbImageURl:(NSString *)imageid;

  
+(NSString *)returnDate:(NSString *)sType diff:(NSInteger)_diff formatter:(NSString *)_formatter;

+(UIImage *)imageWithBgColor:(UIColor *)color ;

+(void)httploading:(UIView *)atview title:(NSString *)title;
+(void)addMUtablearray:(NSMutableArray *)mutablearray arrtemp:(NSArray *)arrtemp;
+(NSString *)returndate_add13timeStamp:(NSString *)timeStampString;
+(void) setattrtext:(UILabel *)lab text:(NSString *)text start:(NSInteger)start;

+(NSString *) returnImageURl:(NSString *)imageid;

+ (UIColor *)randomColor;

@end
